home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- set -e
-
- UPDATENOTIFIERDIR=/var/lib/update-notifier/user.d
- LIBDIR=/usr/lib/firefox-3.5.5
- APPNAME=firefox-3.5
-
- if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
- update-alternatives --install /usr/bin/x-www-browser \
- x-www-browser /usr/bin/$APPNAME 40
- touch $LIBDIR/.autoreg
-
- # Reload AppArmor profile
- APP_PROFILE="/etc/apparmor.d/usr.bin.$APPNAME"
- if [ -f "$APP_PROFILE" ] && aa-status --enabled 2>/dev/null; then
- apparmor_parser -r "$APP_PROFILE" || true
- fi
- fi
-
- echo "Please restart all running instances of $APPNAME, or you will experience problems."
-
- if [ -d $UPDATENOTIFIERDIR ] ; then
- # pgrep matches application names from /proc/<pid>/status which is
- # truncated according to sys/procfs.h definition. Problem is it's
- # platform dependent. Either 15 or 16 chars.
- if [ `/usr/bin/pgrep -x -c firefox` -ne 0 ] ||
- [ `/usr/bin/pgrep -x -c $APPNAME` -ne 0 ] ; then
- cp -f $LIBDIR/$APPNAME-restart-required.update-notifier \
- $UPDATENOTIFIERDIR/$APPNAME-restart-required
- else
- rm -f $UPDATENOTIFIERDIR/$APPNAME-restart-required
- fi
- fi
-
- if [ -x /usr/bin/update-menus ] ; then
- /usr/bin/update-menus
- fi
-
-